package org.geekbang.projects.cs.metrics;

import io.micrometer.core.instrument.simple.SimpleMeterRegistry;

/**
 * @description:
 * @author: Kaijun Chen
 * @date: 2023/2/3
 */
public class CustomerStaffCounter {

    private static SimpleMeterRegistry registry = new SimpleMeterRegistry();

    private static CustomCounter counter = new CustomCounter("customerStaff", "phone", registry);

    public static void countPhoneNumber(String phoneNumber) {
        counter.increment(phoneNumber);
    }

    public static double getPhoneNumberCount(String phoneNumber) {
        return counter.getCount(phoneNumber);
    }

}
